
// <copyright file="BrowserExtendedNavigatingEventArgs.cs" company="Subhadra Software Solutions">
//   
// </copyright>
// <summary>
//   Used in the new navigation events
// </summary>

namespace SubhadraSolutions.Sharp.Utils.Windows.Forms
{
    using System;
    using System.ComponentModel;
    using System.Diagnostics.CodeAnalysis;

    /// <summary>
    ///     Used in the new navigation events
    /// </summary>
    public class BrowserExtendedNavigatingEventArgs : CancelEventArgs
    {
        #region Constructors and Finalizers

        /// <summary>
        /// Initializes a new instance of the <see cref="BrowserExtendedNavigatingEventArgs"/> class.
        /// Creates a new instance of WebBrowserExtendedNavigatingEventArgs
        /// </summary>
        /// <param name="automation">
        /// Pointer to the automation object of the browser
        /// </param>
        /// <param name="url">
        /// The URL to go to
        /// </param>
        /// <param name="frame">
        /// The name of the frame
        /// </param>
        /// <param name="navigationContext">
        /// The new window flags
        /// </param>
        public BrowserExtendedNavigatingEventArgs(object automation, Uri url, string frame, UrlContext navigationContext)
        {
            this.Url = url;
            this.Frame = frame;
            this.NavigationContext = navigationContext;
            this.AutomationObject = automation;
        }

        #endregion Constructors and Finalizers

        #region Public Properties

        /// <summary>
        ///     The pointer to ppDisp
        /// </summary>
        public object AutomationObject { get; private set; }

        /// <summary>
        ///     The name of the frame to navigate to
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public string Frame { get; private set; }

        /// <summary>
        ///     The flags when opening a new window
        /// </summary>
        public UrlContext NavigationContext { get; private set; }

        /// <summary>
        ///     The URL to navigate to
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        public Uri Url { get; private set; }

        #endregion Public Properties
    }
}
